package varargs;

public class MainApplication
{
   public static void main(String[] args)
   {
      System.out.println(soma(2, 2, 2, 2, 2));
   }
   
   private static double soma(double ... numeros)
   {
      double total = 0;
      for (double n : numeros)
      {
         total += n;
      }
      return total;
   }
}
